<%@ include file="../../inc/init.jsp" %>

<html>
	<head>
		<title>
			Graduate Admission System | University of California - San Diego | GRE
		</title>
		<link type="text/css" rel="stylesheet" href="<%= BASE %>css/main.css">
	</head>
	<body>
		<div class="header-top"></div>
		<div class="header">
			<a href="<%= BASE %>index.jsp"><img src="<%= BASE %>img/logo.png"></a>
		</div>
		<div class="content">
		
		<table>
		<tr><td><a href="<%= BASE %>applicant/index.jsp">
				<img src="<%= BASE %>img/home.png"></a>&nbsp;&nbsp;
			</td>
			<td><span style="color: #515151;">You are logged in as: <b><%= request.getRemoteUser() %></b></span>&nbsp;</td>
			<td><a href="<%= BASE %>logout.jsp">
				<img src="<%= BASE %>img/logout.png"></a>
			</td>
		</tr>
		</table><br>

		<h2>GRE</h2>
		
		<%
			GRE gre = new GRE();
			Applicant a = new Applicant();
			
			/** Show GRE results of applicant **/
			
			if(gre.getGre(a.getApplicantId(request.getRemoteUser())))
			{
				%>
				
				<table>
					<tr>
						<td>Analytical Writing:</td>
						<td><%= gre.getAnalytical() %> Score</td>
						<td><%= gre.getAnalyticalPercent() %> %</td>
					</tr>
					<tr>
						<td>Verbal Reasoning:</td>
						<td><%= gre.getVerbal() %> Score</td>
						<td><%= gre.getVerbalPercent() %> %</td>
					</tr>
					<tr>
						<td>Quantitative Reasoning:</td>
						<td><%= gre.getQuantitative() %> Score</td>
						<td><%= gre.getQuantitativePercent() %> %</td>
					</tr>
					<tr>
						<td>Total:</td>
						<td><%= gre.getTotal() %> Score</td>
						<td><%= gre.getTotalPercent() %> %</td>
					</tr>
					<tr>
						<td>Type:</td>
						<td colspan="2">
							<%= gre.getType() %>
						</td>
					</tr>
					<tr>
						<td>Month/Year:</td>
							<td colspan="2">
								<%= gre.getMonth() %> / 
								<%= gre.getYear() %>
							</td>
					</tr>
					<tr>
						<td>Registration No.:</td>
						<td colspan="2"><%= gre.getRegNo() %></td>
					</tr>
				</table>
					
				<%
			}
			else
			{
				out.print("There are no results yet.");
			}
		
		
		%>
		
		</div>
	</body>
</html>